package com.sunrise.xdoc.entity.user;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.sunrise.xdoc.entity.AbstractIdEntity;
import com.sunrise.xdoc.entity.config.Group;
import com.sunrise.xdoc.entity.config.InternalCode;

/**
 * Ho so thuyen chuyen cong tac: vi du tu engineer => project leader.
 * 
 */
@Entity
@Table(name = "op_working_transition")
@Inheritance(strategy = InheritanceType.JOINED)
public class WorkingTransition extends AbstractIdEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    private User nhanVien;
    private InternalCode chucVuOld;
    private InternalCode chucVuNew;
    private User nguoiQuanlyOld;
    private User nguoiQuanlyNew;
    private Group groupOld;
    private Group groupNew;
    private Date ngayThayDoi;
    private InternalCode lyDoThayDoi;
    private Integer thoiHanInMonth;
    private String soBoNhiem;

    @ManyToOne
    @JoinColumn(name = "nhanVien")
    public User getNhanVien() {
        return nhanVien;
    }

    public void setNhanVien(User nhanVien) {
        this.nhanVien = nhanVien;
    }

    @ManyToOne
    @JoinColumn(name = "chucVuOld")
    public InternalCode getChucVuOld() {
        return chucVuOld;
    }

    public void setChucVuOld(InternalCode chucVuOld) {
        this.chucVuOld = chucVuOld;
    }

    @ManyToOne
    @JoinColumn(name = "chucVuNew")
    public InternalCode getChucVuNew() {
        return chucVuNew;
    }

    public void setChucVuNew(InternalCode chucVuNew) {
        this.chucVuNew = chucVuNew;
    }

    @ManyToOne
    @JoinColumn(name = "nguoiQuanlyOld")
    public User getNguoiQuanlyOld() {
        return nguoiQuanlyOld;
    }

    public void setNguoiQuanlyOld(User nguoiQuanlyOld) {
        this.nguoiQuanlyOld = nguoiQuanlyOld;
    }

    @ManyToOne
    @JoinColumn(name = "nguoiQuanlyNew")
    public User getNguoiQuanlyNew() {
        return nguoiQuanlyNew;
    }

    public void setNguoiQuanlyNew(User nguoiQuanlyNew) {
        this.nguoiQuanlyNew = nguoiQuanlyNew;
    }

    @ManyToOne
    @JoinColumn(name = "groupOld")
    Group getGroupOld() {
        return groupOld;
    }

    public void setGroupOld(Group groupOld) {
        this.groupOld = groupOld;
    }

    @ManyToOne
    @JoinColumn(name = "groupNew")
    public Group getGroupNew() {
        return groupNew;
    }

    public void setGroupNew(Group groupNew) {
        this.groupNew = groupNew;
    }

    @Column(name = "ngayThayDoi")
    public Date getNgayThayDoi() {
        return ngayThayDoi;
    }

    public void setNgayThayDoi(Date ngayThayDoi) {
        this.ngayThayDoi = ngayThayDoi;
    }

    @ManyToOne
    @JoinColumn(name = "lyDoThayDoi")
    public InternalCode getLyDoThayDoi() {
        return lyDoThayDoi;
    }

    public void setLyDoThayDoi(InternalCode lyDoThayDoi) {
        this.lyDoThayDoi = lyDoThayDoi;
    }

    @Column(name = "thoiHanInMonth")
    public Integer getThoiHanInMonth() {
        return thoiHanInMonth;
    }

    public void setThoiHanInMonth(Integer thoiHanInMonth) {
        this.thoiHanInMonth = thoiHanInMonth;
    }

    @Column(name = "soBoNhiem")
    public String getSoBoNhiem() {
        return soBoNhiem;
    }

    public void setSoBoNhiem(String soBoNhiem) {
        this.soBoNhiem = soBoNhiem;
    }

}
